package top.kaoshanji.p1ch04a;

/**
 * 代码清单-p1ch04a-075页b：对float或double进行舍入
 * author kaoshanji
 * ^_^
 * create time 2025/3/6 19:51
 */
public class RoundingNumbers {

    public static void main(String[] args) {
        double above = 0.7, below = 0.4;
        float fabove = 0.7f, fbelow = 0.4f;
        System.out.println("Math.round(above): " + Math.round(above));
        System.out.println("Math.round(below): " + Math.round(below));
        System.out.println("Math.round(fabove): " + Math.round(fabove));
        System.out.println("Math.round(fbelow): " + Math.round(fbelow));
    }

}
